
import request from "@/utils/request"

const getSpotShow = () => {
    return request({
        url: `/api/spot/all`,
        method: 'get'

    })
}
const getSpotClass = () => {
    return request({
        url: `/api/spot/class`,
        method: 'get'

    })
}
const getTopSpot= (length) => {
    return request({
        url: `/api/city/top/${length}`,
        method: 'get'

    })
}
const checkFavoriteStatus= (data) => {
    return request({
        url: `/api/favourite/isfavourite`,
        method: 'post',
        data

    })
}
const findTheme= (data) => {
    return request({
        url: `/api/spot/theme/${data}`,
        method: 'get'
    })
}
const findThemeCity= (data) => {
    return request({
        url: `/api/city/theme/${data}`,
        method: 'get'
    })
}

// 添加获取河北省城市的函数
const getHebeiCities = (provinceId) => {
    return request({
        url: `/api/city/province/${provinceId}`,
        method: 'get'
    })
}
export {getSpotClass, getTopSpot,getSpotShow,checkFavoriteStatus,findTheme,findThemeCity,getHebeiCities} 